﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class AnchorGroup000 : MonoBehaviour
{
    private List<Anchor> _originAnchors;
    private List<Anchor> _modifedAnchors;
    private int _anchorCount; //默认4个

    public GameObject AttachedDevice { get; set; }
    public List<Anchor> OriginAnchors { get => _originAnchors; set => _originAnchors = value; }
    public int AnchorCount { get => _anchorCount; set => _anchorCount = value; }

    public List<Anchor> ModifedAnchors { get => _modifedAnchors; set => _modifedAnchors = value; }

    private void Start()
    {
        _originAnchors = new List<Anchor>();
        _modifedAnchors = new List<Anchor>();
    }

    public void AddAnchor(int order, Anchor item)
    {
        if (_originAnchors != null)
        {
            _originAnchors.Insert(order, item);
            _modifedAnchors.Insert(order, item);
            _anchorCount++;
        }
    }

    public void DeleteAnchor(Anchor anchor)
    {
        if (_originAnchors != null)
        {
            _originAnchors.Remove(anchor);
            _anchorCount--;
        }
    }

    public void DealSharedAnchors(SharedAnchor sAnchor)
    {
        //sAnchor.SharedAnchorDict[this]
    }
}




